﻿<ng-include src="'./includes/header.html'"></ng-include>

<div class="main">
    <div class="container">
      <div class="row">
      		<div class="widget stacked">	
				<div class="widget-header">
					<i class="icon-bookmark"></i>
					<h3>{{ 'SHORTCUTS' | i18n }}</h3>
				</div> <!-- /widget-header -->
				<div class="widget-content">
					<div class="shortcuts">
                        <a ng-click="vm.getServers()" class="shortcut">
                            <i class="shortcut-icon icon-refresh"></i>
                            <span class="shortcut-label">{{ 'REFRESH' | i18n }}</span>
                        </a>
					</div> <!-- /shortcuts -->	
				</div> <!-- /widget-content -->
			</div> <!-- /widget -->
		</div>
		<div class="row">
      		<div class="widget stacked widget-table action-table">
					
				<div class="widget-header">
					<i class="icon-th-list"></i>
					<h3>{{ 'SERVERLIST' | i18n }}</h3>
				</div> <!-- /widget-header -->
				
				<div class="widget-content">
					
					<table class="table table-striped table-bordered">
						<thead>
							<tr>
								<th>#</th>
								<th>{{ 'NAME' | i18n }}</th>
								<th>{{ 'STATUS' | i18n }}</th>
								<th>{{ 'LASTDATETIME' | i18n }}</th>
								<th class="td-actions">{{ 'ACTIONS' | i18n }}</th>
							</tr>
						</thead>
						<tbody>
							<tr ng-repeat="server in servers" ng-class="{success: server.is_started, info: server.is_updating}">
								<td>{{server.server_id}}</td>
								<td>{{server.name}}</td>
								<td>
                                    <span ng-show="server.is_started" class="label label-success"><span class="icon icon-refresh">  {{ 'RUNNING' | i18n }}</span></span>
                                    <span ng-show="server.is_stopped" class="label label-info"><span class="icon icon-stop">  {{ 'STOPPED' | i18n }}</span></span>
                                    <span ng-show="server.is_updating" class="label label-important"><span class="icon icon-wrench">  {{ 'UPDATING' | i18n }}</span></span>
                                    <span ng-show="server.is_stopping" class="label label-warning"><span class="icon icon-arrow-down">  {{ 'STOPPING' | i18n }}</span></span>
                                    <span ng-show="server.is_starting" class="label label-warning"><span class="icon icon-arrow-up">  {{ 'STARTING' | i18n }}</span></span>
								</td>
								<td>{{server.last_datetime}}</td>
								<td><a href="#/server/{{server.server_id}}" class="btn btn-info btn-lg btn-block" role="button"><span>{{ 'MANAGE' | i18n }}</span></a></td>
							</tr>
							</tbody>
						</table>
					
				</div> <!-- /widget-content -->
			</div>
		</div>
	</div>
</div>
